{% set uniqid = uniqid ?? uniqid('database_') %}
{% set idBase = "mongodb-databases-#{uniqid}" %}
{% set nameBase = "mongodb[databases][#{uniqid}]" %}

<div id="{{ idBase }}" data-uniqid="{{ uniqid }}" data-name="{{ nameBase }}"
     class="tab-pane {{ active is defined and active ? 'active' }}">
    <div class="help-block col-xs-12">
        If you want to assign a user to multiple databases, simply create more databases and type in
        the same username and password. Only the password for the first entry will be considered,
        <strong>but all fields must be completed</strong>!
    </div>

    <div class="clearfix"></div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-name">
            Database
        </label>
        <input type="text" id="{{ idBase }}-name"
               name="{{ nameBase }}[name]"
               placeholder="database_name" class="form-control"
               value="{{ database.name }}" />
    </div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-user">
            Username
        </label>
        <input type="text" id="{{ idBase }}-user"
               name="{{ nameBase }}[user]"
               placeholder="username" class="form-control"
               value="{{ database.user }}" />
    </div>

    <div class="clearfix"></div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-password">
            Password
        </label>
        <input type="text" id="{{ idBase }}-password"
               name="{{ nameBase }}[password]"
               placeholder="123" class="form-control"
               value="{{ database.password }}" />
        <div class="help-block">
            This cannot be blank!
        </div>
    </div>

    <div class="clearfix"></div>
</div>
